#pragma once

#include "../common/BasePclModel.h"
#include "includeBase.h"

class MinCutBasedSegmentationModel : public BasePclModel
{
public:
    MinCutBasedSegmentationModel();

public:
    static MinCutBasedSegmentationModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QString pcdFile() const { return pcdFile_; }
    void setPcdFile(const QString& pcdFile) { pcdFile_ = pcdFile; }

    double bgPointX() const { return bgPointX_; }
    void setBgPointX(double bgPointX) { bgPointX_ = bgPointX; }

    double bgPointY() const { return bgPointY_; }
    void setBgPointY(double bgPointY) { bgPointY_ = bgPointY; }

    double bgPointZ() const { return bgPointZ_; }
    void setBgPointZ(double bgPointZ) { bgPointZ_ = bgPointZ; }

    double segSigma() const { return segSigma_; }
    void setSegSigma(double segSigma) { segSigma_ = segSigma; }

    double segRadius() const { return segRadius_; }
    void setSegRadius(double segRadius) { segRadius_ = segRadius; }

    int segNumberOfNeighbours() const { return segNumberOfNeighbours_; }
    void setSegNumberOfNeighbours(int segNumberOfNeighbours) { segNumberOfNeighbours_ = segNumberOfNeighbours; }

    double segSourceWeight() const { return segSourceWeight_; }
    void setSegSourceWeight(double segSourceWeight) { segSourceWeight_ = segSourceWeight; }

private:
    QString pcdFile_ = "<pcl-data>/tutorials/min_cut_segmentation_tutorial.pcd";

    double bgPointX_ = 68.97;
    double bgPointY_ = -18.55;
    double bgPointZ_ = 0.57;

    double segSigma_ = 0.25;
    double segRadius_ = 3.0433856;
    int segNumberOfNeighbours_ = 14;
    double segSourceWeight_ = 0.8;
};
